function LoginView() {
	
	var ControllerLogin = require('controller/ControllerLogin');
	var LoginTO = require('model/LoginTO');
	var winLogin = Ti.UI.createWindow({
		title : "login",
		backgroundColor : 'black'
	});
	var viewLog = Ti.UI.createView({
		layout : "vertical"
	});

	var username = Titanium.UI.createTextField({
		color : '#336699',
		top : 10,
		width : 300,
		height : 40,
		hintText : 'Username'
	});
	viewLog.add(username);

	var password = Titanium.UI.createTextField({
		color : '#336699',
		top : 60,
		width : 300,
		height : 40,
		hintText : 'Password',
		passwordMask : true
	});
	viewLog.add(password);

	// var respBoton = new respuestaBoton();
	var loginBtn = Titanium.UI.createButton({
		title : 'Login',
		top : 110,
		width : 90,
		height : 35,
		borderRadius : 1,
		font : {
			fontFamily : 'Arial',
			fontWeight : 'bold',
			fontSize : 14
		}
	});
	loginBtn.addEventListener('click', function() {
		var user = username.valueOf();
		var pass = password.valueOf();
		
		var login = new LoginTO(user,pass);
		var control = new ControllerLogin(login);
		control.open();
		
	});
	viewLog.add(loginBtn);
	winLogin.add(viewLog);
	return winLogin;
}

module.exports = LoginView;
